Integrand size = 38, antiderivative size = 141 \[ \int \cos ^2(c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=-\frac {B (b \cos (c+d x))^{4+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4+n}{2},\frac {6+n}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{b^4 d (4+n) \sqrt {\sin ^2(c+d x)}}-\frac {C (b \cos (c+d x))^{5+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {5+n}{2},\frac {7+n}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{b^5 d (5+n) \sqrt {\sin ^2(c+d x)}} \]
[Out]
Time = 0.18 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {16, 3089, 2827, 2722} \[ \int \cos ^2(c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=-\frac {C \sin (c+d x) (b \cos (c+d x))^{n+5} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n+5}{2},\frac {n+7}{2},\cos ^2(c+d x)\right )}{b^5 d (n+5) \sqrt {\sin ^2(c+d x)}}-\frac {B \sin (c+d x) (b \cos (c+d x))^{n+4} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n+4}{2},\frac {n+6}{2},\cos ^2(c+d x)\right )}{b^4 d (n+4) \sqrt {\sin ^2(c+d x)}} \]
[In]
[Out]
Rule 16
Rule 2722
Rule 2827
Rule 3089
Rubi steps \begin{align*} \text {integral}& = \frac {\int (b \cos (c+d x))^{2+n} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx}{b^2} \\ & = \frac {\int (b \cos (c+d x))^{3+n} (B+C \cos (c+d x)) \, dx}{b^3} \\ & = \frac {B \int (b \cos (c+d x))^{3+n} \, dx}{b^3}+\frac {C \int (b \cos (c+d x))^{4+n} \, dx}{b^4} \\ & = -\frac {B (b \cos (c+d x))^{4+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4+n}{2},\frac {6+n}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{b^4 d (4+n) \sqrt {\sin ^2(c+d x)}}-\frac {C (b \cos (c+d x))^{5+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {5+n}{2},\frac {7+n}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{b^5 d (5+n) \sqrt {\sin ^2(c+d x)}} \\ \end{align*}
Time = 0.31 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.85 \[ \int \cos ^2(c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=-\frac {\cos ^3(c+d x) (b \cos (c+d x))^n \cot (c+d x) \left (B (5+n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4+n}{2},\frac {6+n}{2},\cos ^2(c+d x)\right )+C (4+n) \cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {5+n}{2},\frac {7+n}{2},\cos ^2(c+d x)\right )\right ) \sqrt {\sin ^2(c+d x)}}{d (4+n) (5+n)} \]
[In]
[Out]
\[\int \left (\cos ^{2}\left (d x +c \right )\right ) \left (\cos \left (d x +c \right ) b \right )^{n} \left (B \cos \left (d x +c \right )+C \left (\cos ^{2}\left (d x +c \right )\right )\right )d x\]
[In]
[Out]
\[ \int \cos ^2(c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \left (b \cos \left (d x + c\right )\right )^{n} \cos \left (d x + c\right )^{2} \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos ^2(c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \cos ^2(c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \left (b \cos \left (d x + c\right )\right )^{n} \cos \left (d x + c\right )^{2} \,d x } \]
[In]
[Out]
\[ \int \cos ^2(c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \left (b \cos \left (d x + c\right )\right )^{n} \cos \left (d x + c\right )^{2} \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos ^2(c+d x) (b \cos (c+d x))^n \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int {\cos \left (c+d\,x\right )}^2\,{\left (b\,\cos \left (c+d\,x\right )\right )}^n\,\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )\right ) \,d x \]
[In]
[Out]